package cn.edu.scau.cmi.luochenghao.chapter06;

abstract class A6_9 {
	abstract int sum(int x,int y);
	int sub(int x,int y) {
		return x-y;
	}
}

class B6_9 extends A6_9 {
	int sum(int x,int y) {
		return x+y;
	}
}

public class Example6_9 {

	public static void main(String[] args) {
		B6_9 b=new B6_9();
		int sum =b.sum(30, 20);
		int sub=b.sub(30, 20);
		System.out.println("sum="+sum);
		System.out.println("sum="+sub);

	}

}
